#pragma once

#include "clkAbstract.h"

class clkMesh : public clkAbstract
{
protected:
	DMesh      m_mesh;
	DTexture2D m_texture;

	bool m_hasMesh;
	bool m_hasTexture;

	V3DF m_cen;
	V3DF m_trn;
	V3DF m_scl;
	V3DF m_rot;

	V3DF m_look;
	V3DF m_right;
public:
	clkMesh();
	~clkMesh();

	void initMesh(
		char* a_meshPath,
		V3DF  a_cen,
		V3DF  a_trn,
		V3DF  a_scl,
		V3DF  a_rot);
	void initTexture(char* a_texturePath);

	virtual void update();
	virtual void draw();

	bool hasMesh(){return m_hasMesh;}
	bool hasTexture(){return m_hasTexture;}

	DMesh getMesh(){return m_mesh;}
	DTexture2D getTexture(){return m_texture;}

	void setCen(V3DF a_cen){m_cen = a_cen;}
	void setTrn(V3DF a_trn){m_trn = a_trn;}
	void setScl(V3DF a_scl){m_scl = a_scl;}
	void setRot(V3DF a_rot){m_rot = a_rot;}

	V3DF getCen(){return m_cen;}
	V3DF getTrn(){return m_trn;}
	V3DF getScl(){return m_scl;}
	V3DF getRot(){return m_rot;}

	V3DF& refCen(){return m_cen;}
	V3DF& refTrn(){return m_trn;}
	V3DF& refScl(){return m_scl;}
	V3DF& refRot(){return m_rot;}

	V3DF* ptrCen(){return &m_cen;}
	V3DF* ptrTrn(){return &m_trn;}
	V3DF* ptrScl(){return &m_scl;}
	V3DF* ptrRot(){return &m_rot;}
};